﻿using DNT.RavenQA.Core.Models;
using Raven.Client;
using Raven.Client.Linq;

namespace DNT.RavenQA.Web.Infrastructure.QueryModel
{
    public class QuestionQueryHelper
    {
        private QuestionQueryHelper() { }

        public static IRavenQueryable<Question> GetBaseQuery(IDocumentSession session)
        {
            return session.Query<Question>()
                .Include<Question>(x => x.User.Id)
                .Include<Question>(x => x.VotesId)
                .Include<Question>(x => x.ViewsId);
        }
    }
}